package com.com.knowledgepaymentmanagementsystem.service.marketing.impl;

import com.com.knowledgepaymentmanagementsystem.mapper.marketing.SeckillMapper;
import com.com.knowledgepaymentmanagementsystem.pojo.marketing.Seckill;
import com.com.knowledgepaymentmanagementsystem.service.marketing.SeckillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SeckillServiceImpl implements SeckillService {

    @Autowired
    private SeckillMapper seckillMapper;

    @Override
    public List<Seckill> getSeckill(Seckill seckill) {
        return seckillMapper.getSeckill(seckill);
    }

    @Override
    public Object insertSeckill(Seckill seckill) {
        return seckillMapper.insert(seckill);
    }

    @Override
    public void updateSeckill(Seckill seckill) {
        seckillMapper.updateById(seckill);
    }

    @Override
    public void deleteSeckill(Integer id) {
        seckillMapper.deleteById(id);
    }
}
